Skip to content

Validate Identity email address#1932

Merged
flavorjones merged 1 commit intomainfrom
flavorjones-validate-email
Dec 4, 2025
Merged

Validate Identity email address#1932
flavorjones merged 1 commit intomainfrom
flavorjones-validate-email

Conversation

@flavorjones
Copy link
Member

@flavorjones flavorjones commented Dec 4, 2025

using the "standard" email regexp URI::MailTo::EMAIL_REGEXP. The form field will validate this in the browser, but if bots are creating identities, they can put whatever they want in here. So let's add some protection against that.

The HtmlHelper regex was renamed here to avoid confusing Brakeman, which does imprecise constant lookup and was confusing the two constants, one of which uses \A and \z and the other does not (intentionally).

ref: https://app.fizzy.do/5986089/cards/3276

@flavorjones flavorjones force-pushed the flavorjones-validate-email branch 2 times, most recently from 3277633 to db56e87 Compare December 4, 2025 18:56
using the "standard" email regexp URI::MailTo::EMAIL_REGEXP. The form
field will validate this in the browser, but if bots are creating
identities, they can put whatever they want in here. So let's add some
protection against that.

The HtmlHelper regex was renamed here to avoid confusing Brakeman,
which does imprecise constant lookup and was confusing the two
constants, one of which uses `\A` and `\z` and the other does
not (intentionally).

ref: https://app.fizzy.do/5986089/cards/3276
@flavorjones flavorjones force-pushed the flavorjones-validate-email branch from db56e87 to 00eee29 Compare December 4, 2025 19:03
@flavorjones flavorjones merged commit fee376b into main Dec 4, 2025
12 checks passed
@flavorjones flavorjones deleted the flavorjones-validate-email branch December 4, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant